<template>
	<view class="item">
		<navigator :url="'/pages/index/components/detail/index?id='+ item['id'] ">
			<view class="head">
				<image :src="item['author']['avatar_url']"></image>
				<text>{{item['author']['loginname']}}</text>
			</view>
			<view class="content">{{item['title']}}</view>
			<view class="footer">
				<text>最新动态：{{fmDate(item['last_reply_at'])}}</text>
			</view>
		</navigator>
	</view>
</template>

<script>
	import {formatDate} from '@/common/utils'
	export default {
		props: ['item'],
		methods: {
			fmDate (date){
				return formatDate(date)
			}
		}
	}
</script>

<style lang="scss">
	topic-reply-item,
	.item{
		width: 100%;
	}
	.item{
		border: 1px solid #eee;
		border-top: none;
		navigator{
			padding: 0 15px;
		}
		.head{
			display: flex;
			padding: 12px 0 8px;
			image{
				margin-right: 10px;
				width: 28px;
				height: 28px;
			}
			text{
				font-size: 16px;
				color: #666;
			}
		}
		.content{
			padding: 5px 0;
			font-size: 15px;
			font-weight: bold;
			line-height: 1.2;
			color: #333;
		}
		.footer{
			padding-bottom: 5px;
			text-align: right;
			color: #999;
			font-size: 12px;
		}
	}
</style>
